package com.huatai.common.tool;

/**
 * @program: ht-system
 * @description: key
 * @author: songxiude
 * @create: 2023-01-31 15:31
 **/

public class HtBeanMapKey {
    private final Class type;
    private final int require;

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof HtBeanMapKey)) {
            return false;
        } else {
            HtBeanMapKey other = (HtBeanMapKey)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$type = this.type;
                Object other$type = other.type;
                if (this$type == null) {
                    if (other$type == null) {
                        return this.require == other.require;
                    }
                } else if (this$type.equals(other$type)) {
                    return this.require == other.require;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof HtBeanMapKey;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $type = this.type;
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        result = result * 59 + this.require;
        return result;
    }

    public HtBeanMapKey(final Class type, final int require) {
        this.type = type;
        this.require = require;
    }
}
